
#include<iostream>
using namespace std;
#include<assert.h>
#include "algorithm.h"

#define SORT_ARRAY_ASSERT(a, n) \
	for(int i = 0; i < n - 1; ++i)\
	{ assert(a[i] <= a[i + 1]);}

int main()
{
	int a[] = {10, 2, 9, 7, 6, 8};
	HeapSort(a, sizeof(a)/sizeof(int));
	SORT_ARRAY_ASSERT(a, sizeof(a)/sizeof(int));
	return 0;
}